package com.useage.day06.service;

import java.util.List;

import com.useage.day06.dao.UserDao;
import com.useage.day06.model.User;

public class UserService {

	private UserDao userDao;
	
	public List<User> getAllUser() {
		return userDao.getAllUser();
	}

	public User getUserById(Integer uId) {
		return userDao.getUserById(uId);
	}
	
	public boolean updateUser(User newUser) {
		int n = userDao.updateUser(newUser);
		
		if (n > 0) {
			return true;
		}
		
		return false;
	}
}
